<template>
  <div class="app-container" style="height: 640px">
    <template-medical-record :to-clinic="queryParams.toClinic" :tr-disabled="false"
                             @row-click="rowClick" @template-quote="quoteOk"/>
    <!--        <div class="div-style" style="height: 310px">-->
    <!--            <template-table :query-params="queryParams" :refresh-key="refreshKey" :tr-disabled="false"-->
    <!--                            @row-click="rowClick"/>-->
    <!--        </div>-->
    <!--        <div class="mt10 div-style" style="height: calc(100% - 320px)">-->
    <!--            <template-medical-record-item ref="templateMedicalRecordItemRef" :to-clinic="queryParams.toClinic"-->
    <!--                                          @template-quote="quoteOk"/>-->
    <!--        </div>-->
  </div>
</template>

<script lang="ts" setup>
import TemplateMedicalRecord from '@/views/template/templateMedicalRecord/index.vue'


const emits = defineEmits(["quoteOkIndex"])
const props = defineProps({
  queryParams: {
    type: Object as any
  },
  refreshKey: {
    type: Number,
    default: 0
  },
})
const templateMedicalRecordItemRef = ref()


function rowClick(row: any) {
  nextTick(() => {
    templateMedicalRecordItemRef.value.rowClick(row)
  })
}

// 模板引用 -》 最终数据处理
function quoteOk(form: any) {
  debugger
  emits("quoteOkIndex", form)
}

function emptyItem() {
  nextTick(() => {
    templateMedicalRecordItemRef.value.emptyItem()
  })
}

defineExpose({
  emptyItem,
  quoteOk
})
</script>
